package cn.jsu.oj.judgment.net.netHandler;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

/**
 * @author ahtonc
 */
public class OutBoundHandler extends MessageToByteEncoder {

    /**
     * netty写包规则
     * @param channelHandlerContext
     * @param o
     * @param byteBuf
     */
    @Override
    protected void encode(ChannelHandlerContext channelHandlerContext, Object o, ByteBuf byteBuf){
        byteBuf.writeBytes((byte[]) o);
    }

}
